// 基于template/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{spinalCase ctrl.codeName}}-grid-vo.ts.hbs生成
import { ControlVOBase } from '@/core';

export class GridDataControlVO extends ControlVOBase {
	constructor(data: any) {
		super(data);
		const wfKey = [
			'srftaskid',
			'srftaskdefinitionkey',
			'srfprocessdefinitionkey',
			'srfprocessdefinitionid',
			'srfprocessinstanceid',
		];
		//  表格自持属性
		this.$ownKeys = [
			'sys_common_name',
			'object_class',
			'cn',
			'srfkey',
			'srfdataaccaction',
			'srfdatatype',
			'srfmajortext',
			...wfKey,
		];
	}

	get object_class() {
		return this.$DO.object_class;
	}

	set object_class(value: any) {
		this.$DO.object_class = value;
	}
	get cn() {
		return this.$DO.cn;
	}

	set cn(value: any) {
		this.$DO.cn = value;
	}
	get srfkey() {
		return this.$DO.id;
	}

	set srfkey(value: any) {
		this.$DO.id = value;
	}
	get srfdataaccaction() {
		return this.$DO.id;
	}

	set srfdataaccaction(value: any) {
		this.$DO.id = value;
	}
	get srfdatatype() {
		return this.$DO.object_class;
	}

	set srfdatatype(value: any) {
		this.$DO.object_class = value;
	}
	get srfmajortext() {
		return this.$DO.cn;
	}

	set srfmajortext(value: any) {
		this.$DO.cn = value;
	}

	set sys_common_name(value: any) {
		this.$DO.id = value;
	}
	get sys_common_name() {
		return this.$DO.id;
	}

	get srftaskid() {
		return this.$DO.srftaskid;
	}

	get srftaskdefinitionkey() {
		return this.$DO.srftaskdefinitionkey;
	}

	get srfprocessdefinitionkey() {
		return this.$DO.srfprocessdefinitionkey;
	}

	get srfprocessdefinitionid() {
		return this.$DO.srfprocessdefinitionid;
	}

	get srfprocessinstanceid() {
		return this.$DO.srfprocessinstanceid;
	}
}

export const GridControlVO = [
	{ name: 'GridControlVO', controlVO: GridDataControlVO },
];
